﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using geetol.sms;

namespace geetol.sms.api
{
    public partial class smsController : Form
    {
      
        public smsController()
        {
            InitializeComponent();
        }

        private void smsController_Load(object sender, EventArgs e)
        {
            LoadSmsContent();
        }

        public void LoadSmsContent()
        {
            var d = sysvar.smsContent;
            flowLayoutPanel1.Controls.Clear();
            foreach (var t in d)
            {
                MyContorl.smsContent c = new MyContorl.smsContent();
                c.Margin = new Padding(1);
                c.smsKey = t.smskey;
                c.smsValue = t.smsValue;
                c.isTrigger = t.smsSend;
                c.BackColor = Color.White;
                c.BindingTriggerChange();
                flowLayoutPanel1.Controls.Add(c);
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            new editSqlConnection().ShowDialog();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            new editSendSmsConfig().ShowDialog();
        }

        //科脉测试
        private void button3_Click(object sender, EventArgs e)
        {
            new test().SendAddVIP();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            new test().DeleteTestData();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            new editSmsAPIinfo().ShowDialog();
        }
    }
}
